Skip to content

RATIS-2843. Fix cache misses and stale entries in FollowerInfoMap - #1720

Merged
amaliujia merged 1 commit into
apache:masterfrom
lugency:RATIS-2843
Dec 3, 2026
Merged

amaliujia merged 1 commit into
apache:masterfrom
lugency:RATIS-2843

Conversation

@lugency

@lugency lugency commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Assisted by OpenAI Codex.

What changes were proposed in this pull request?

  • Fix repeated cache misses in FollowerInfoMap. Since the map has no entry for the leader, LeaderStateImpl.isSameSize() now excludes the leader from the expected follower count when the configuration includes it.
  • Synchronize FollowerInfoMap.put() and invalidate the cache when it replaces an existing entry.

What is the link to the Apache JIRA?

RATIS-2843

How was this patch tested?

Added and ran TestFollowerInfoMap.

@szetszwo szetszwo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 the change looks good.

@szetszwo

szetszwo commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

@adoroszlai ,

@amaliujia

amaliujia commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

There is a warning from https://github.com/lugency/ratis/actions which might clarify this:

Screenshot 2026-12-03 at 10 32 24

And a repo maintainer needs to do something, which I assume is the forked repo maintainer?

@amaliujia

amaliujia commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

I think @lugency has to manually (re-)enable github actions on the forked repo and then re-trigger the CI.

@lugency

lugency commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @szetszwo for the review and @amaliujia for pointing this out! I've re-enabled GitHub Actions on my fork and re-triggered the CI.

@amaliujia

Copy link
Copy Markdown
Contributor

Merging! Thanks @lugency for the patch and @szetszwo for the review!

@amaliujia
amaliujia merged commit 14592ac into apache:master Dec 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants